//
//  WebSocketUtil.h
//  Mahjong
//
//  Created by 饶首建 on 17/5/23.
//  Copyright © 2017年 com.ikamobile.com. All rights reserved.
//

#import <Foundation/Foundation.h>

@protocol GameCallBackDelegate <NSObject>

- (void)connectCallBack:(id)data;
- (void)actionCallBack:(id)data;
- (void)newGameCallBack:(id)data;
- (void)matchCallBack:(id)data;
- (void)errorCallBack:(id)data;
- (void)disConnectCallBack:(id)data;
- (void)meCallBack:(id)data;
- (void)matchLeaveCallBack:(id)data;
- (void)matchBackCallBack:(id)data;
- (void)matchWaitCallBack:(id)data;
- (void)matchReconnectCallBack:(id)data;
- (void)matchChangeSeatCallBack:(id)data;


@end

@interface WebSocketUtil : NSObject

@property (nonatomic,weak) id<GameCallBackDelegate> delegate;

+(instancetype)sharedInstance;
- (void)connect:(NSDictionary *)dict;
- (void)close;
- (void)reconnect;
- (void)send:(NSString*)eventName things:(NSArray*)array;
@end
